#pragma once


#include "message.h"
#include "log.h"
#include "singleton.h"
#include "fdfs_client.h"
#include "fdfs_global.h"
#include "read_conf.h"





class COpFastDfs : public ISingleton<COpFastDfs>
{

	public:
		// return if the fast dfs is initializated
		bool IsFastDfsInitializated();

		// store the data to fastdfs ,and return if store data success
		bool StoreDataToFastDFS(const SFastdfsData& storeData, char* cUrldata, char* cGroupname);



	private:
		int			store_path_index;
		ConnectionInfo *pTrackerServer;
		stFastDfsInfo FastDfsCfg;

		// if the fastdfs is initializated
		bool bInitializated;
		friend ISingleton<COpFastDfs>;
		friend class std::auto_ptr<COpFastDfs>;

		COpFastDfs();
		~COpFastDfs();
};
